/*
 * Copyright (c) 2024 Huawei Technologies Co.,Ltd.
 *
 * openGauss is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *
 * http://license.coscl.org.cn/MulanPSL2
 *
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 * -------------------------------------------------------------------------
 *
 * htap_helpers.h
 * Helper function definitions for HTAP.Holds global configuration for the HTAP module.
 *
 * IDENTIFICATION
 * src/include/storage/htap/htap_helpers.h
 *
 * -------------------------------------------------------------------------
 */

#ifndef HTAP_CSN_MANAGER_H
#define HTAP_CSN_MANAGER_H

#include "icsn_manager.h"

namespace htap {
class HTAPCSNManager final : public MOT::ICSNManager {
public:
    HTAPCSNManager() noexcept {}

    ~HTAPCSNManager() override {}

    /** @brief Get the next csn. */
    uint64_t GetNextCSN() override;

    /** @brief Get the current csn. */
    uint64_t GetCurrentCSN() override;

    /** @brief Get the current csn. */
    uint64_t GetGcEpoch() override;

    /** @brief Used to enforce a csn value. */
    void SetCSN(uint64_t value) override;
};
} // namespace htap

#endif /* HTAP_CSN_MANAGER_H */
